Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flag to execute actions in sync way while accepting event #1021

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yogeshpandey
Copy link

Added a flag in statemachine to run all transition and state entry/exit actions in sync while accepting an event.
This will allow the caller of sendEvent to know if there was any action failure and counter measures can be taken to handle failed execution.

This feature is very useful if we use a spring state machine for an Order use-case where Actions can update to database independently.
Using this flag enables us to make the whole part sending event and execution of actions part of a single transaction.

@pivotal-cla
Copy link

@yogeshpandey Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@yogeshpandey Thank you for signing the Contributor License Agreement!

@pdalfarr
Copy link

@yogeshpandey so without this modification, sending event and execution of actions is NOT part of a single DB transaction?

I would prefer this PR to be accepted, but in the mean time, I am searching for an alternative, hence this question:
Is it a way to cope with that without the modification in this PR?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants